using System;
using NUnit.Framework;
using StrategicDataSystems.Cloud.Monitoring.HostedServices;
using System.Collections.Generic;

namespace StrategicDataSystems.Cloud.Monitoring.Tests.Given_A_HostedServiceManagementGateway
{
    [TestFixture]
    public class When_KillHostedServiceDeployment_Is_Called
    {
        /// <summary>
        /// This test method calls the Azure API and can take some time since it calls for a suspend, waits for a
        /// Successful operation response and then calls delete.  If there isn't a deployment in the slot indicated for
        /// the test constants it will throw an error.  Otherwise you have to manually check the result.
        /// </summary>
        [Test]
        [Category("Integration")]
        [Explicit("This test makes a call to the Azure Management API.")]
        public void Should_Send_Stop_And_Delete_Command()
        {
            string subscriptionId = TestSettings.TestSubscriptionId;
            string certificateThumbprint = TestSettings.TestCertificateThumbprint;

            var managementGateway = new HostedServiceManagementGateway();
            string hostedServiceName = TestSettings.TestHostedServiceName;
            string slot = TestSettings.TestDeploymentSlot ;

            managementGateway.KillHostedServiceDeployment(subscriptionId, certificateThumbprint, hostedServiceName, slot );

            Assert.Inconclusive();
        }
    }

}
